<?php get_header(); ?>

	<div id="page">

		<div id="content">


		<?php if (have_posts()) : ?>

		 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>				
		<h1 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h1>
		
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h1 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h1>
		
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h1 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h1>

		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h1 class="pagetitle">Archive for <?php the_time('Y'); ?></h1>
		
	  <?php /* If this is a search */ } elseif (is_search()) { ?>
		<h1 class="pagetitle">Search Results</h1>
		
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h1 class="pagetitle">Author Archive</h1>

		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h1 class="pagetitle">Blog Archives</h1>

		<?php } ?>




<?php while (have_posts()) : the_post(); ?>
			
		<div class="archivepost" id="post-<?php the_ID(); ?>">
                              
		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

		<p class="postinfo">By <?php the_author() ?> | <?php the_time('F j, Y') ?> | <?php the_category(', ') ?> | <a href="<?php comments_link(); ?>"><?php comments_number('no comments yet','1 comment','% comments'); ?></a></p>
		
		</div>	
	        <?php endwhile; endif; ?>

		<div class="navigation">
		<div class="alignleft">
		<?php next_posts_link('&laquo; Previous Entries') ?></div>
		<div class="alignright">
		<?php previous_posts_link('Next Entries &raquo;') ?></div>
                </div>

                </div>

<?php get_sidebar(); ?>


</div>
<?php get_footer(); ?>